﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Google.Apis.Tasks.v1.Data;

namespace G_Tasks
{
    public partial class TasksForm : Form
    {
        public TasksForm(IList<TaskList> lists)
        {
            InitializeComponent();

            // Open a NoteForm for every task list.
            foreach (TaskList list in lists)
            {
                tabControl1.TabPages.Add(new TasksTabPage(list));
            }
        }

        private void TasksForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            foreach (TasksTabPage tab in tabControl1.TabPages)
            {
                tab.NoteForm_FormClosing();
            }
        }
    }
}
